﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Koonsoft.HYCRM.BLL;

public partial class Client_ClientDetail : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }

    protected void FormView1_DataBound(object sender, EventArgs e)
    {
        var mobileLable = FormView1.FindControl("MobileLabel");
        if (mobileLable != null)
        {
            var mobile = ((Label)mobileLable).Text;
            if (!string.IsNullOrEmpty(mobile))
            {
                ((Label)mobileLable).Text = EncryptHelper.Decrypt(mobile, "3.141592");
            }
        }

        var addressLable = FormView1.FindControl("AddressLabel");
        if (addressLable != null)
        {
            var address = ((Label)addressLable).Text.Trim();
            if (!string.IsNullOrEmpty(address))
            {
                ((Label)addressLable).Text = EncryptHelper.Decrypt(address, "3.141592");
            }
        }

        var telephoneLabel = FormView1.FindControl("TelephoneLabel");
        if (telephoneLabel != null)
        {
            var telephone = ((Label)telephoneLabel).Text.Trim();
            if (!string.IsNullOrEmpty(telephone))
            {
                ((Label)telephoneLabel).Text = EncryptHelper.Decrypt(telephone, "3.141592");
            }
        }
    }
}